home *** CD-ROM | disk | FTP | other *** search
-
- pmake quick reference guide
-
- Command flags
- -------------
- -d <what> Turn on debug in <what> modules of pmake.
- -f <file> Use <file> for makefile.
- -h Print help.
- -i Ignore all errors.
- -k Keep going even after detecting an error.
- -l Create lock file.
- -n Don't actually execute.
- -p <#> Print graph. # = 0, 1, 2, 3
- -q Query and return 0 if up-to-date.
- -r Remove built-in rules.
- -s Do not echo commands.
- -t Just touch targets.
- -v System V compatable make (same as -B -V).
- -x Ignored.
- -B System V compatable but try to parallelize.
- -C Disable -B.
- -D <variable> Define <variable> to be 1.
- -I <directory> Define <directory> to search for include files.
- -J <#> Specify maximum number of jobs to run at once.
- -L Ignored.
- -M Do old-style make.
- -P Don't use pipes. Controls the way pmake displays
- output from all of its children.
- -V Do old-style variable expansion.
- -W Don't print warning messages.
- -X Ignored.
- VAR=value Set the value of variable VAR.
-
- Makefile Search Order
- ---------------------
- Normal -M flag
- ------ -------
- ./Makefile ./makefile
- ./makefile ./Makefile
-
- Dependency operators
- --------------------
- : Set dependency for target to source. Can accumulate over
- multiple lines.
- ! Same as : except always done.
- :: Same as : except cannot accumulate. Target can be specified
- more than once but each time is separate.
-
- Variable definitions
- --------------------
- <var> = <value> Set <var> to <value>.
- <var> += <value> Append <value> to <var>.
- <var> ?= <value> Reassign <var> to <value> if <var> exists.
- <var> := <value> Set <var> to expanded <value>.
- <var> != <command> Execute <command> and set <var> to stdout.
-
- Predefined local variables
- --------------------------
- .TARGET ($@) Name of the target. If an archive, includes the path
- to the file which will be archived.
- .OODATE ($?) List of sources that were out of date.
- .ALLSRC ($>) List of all sources for this target.
- .PREFIX ($*) File portion of the current file being processed.
- .IMPSRC ($<) Implied source file for this target (if none
- provided).
- .ARCHIVE ($%) The path to the archive file.
- .MEMBER ($!) The actual member name.
- $(@F) File portion of target file.
- $(<F) $(>F) File portion of all sources for this target.
- $(*F) File portion of current file being processed.
- $(%F) File portion of archive file.
- $(@D) Directory portion of target file.
- $(<D) $(>D) Directory portion of all sources for this target.
- $(*D) Directory portion of the current file being processed.
- $(%D) Directory portion of archive file.
-
- Predefined variables
- --------------------
- .PMAKE Set to name by which pmake was invoked.
- MAKE Set to name by which pmake was invoked.
- .MAKEFLAGS Set to flags passed to pmake.
- MFLAGS Set to flags passed to pmake.
-
- Environment variables (always included)
- ---------------------
- PMAKE Set to flags to be used by pmake.
-
- Variable expansion $(<var>[:<mod>[:<mod>]])
- ------------------
- M<pattern> Select only words containing pattern.
- * 0 or more characters of any sort.
- ? Any single character.
- [abcd] Any single character a, b, c or d.
- [a-z] Any single lower case character.
- N<pattern> Same as M except selects all other words except those
- containing the pattern.
- S/<p1>/<p2>/[g] Replaces <p1> with <p2>. 'g' does it globally. Can
- have '^' or '$' to select beginning or ending of word.
- '&' in <p2> represents all of <p1>.
- T Tail of the component.
- H Head of the component.
- E Extension of the component.
- R Root of the component.
-
- Special pmake commands
- ----------------------
- #include "<file>" Include <file> from search path internal to
- pmake.
- #include <"file"> Include "file" from pmake system directory.
- include <file> Include <file> from current directory.
- #if <exp> Conditional execution. Can use the following
- macros:
- defined <var> <var> must be defined.
- make .MAIN must be defined.
- exists <file> <file> must be in .PATH.
- empty <var> After expansion, <var> is null.
- #ifdef <var> Conditional execution to test variable
- definition.
- #ifndef <var> Conditional execution to test variable
- non-definition.
- #ifmake Conditional execution to test if .MAIN
- defined.
- #ifnmake Conditional execution to test if .MAIN not
- defined.
- #else Follows one of the above #if???.
- #elif Follows one of the above #if???.
- #elifdef Follows one of the above #if???.
- #elifndef Follows one of the above #if???.
- #elifmake Follows one of the above #if???.
- #elifnmake Follows one of the above #if???.
- #endif Follows one of the above #if???.
- #undef Un-defines a variable.
-
- Target attributes <target> : <attribute>
- -----------------
- .DONTCARE If pmake can't figure out how to create it, pmake
- doesn't care.
- .EXEC Always executes the script but is invisible to other
- targets.
- .IGNORE Ignore errors from target's commands.
- .INVISIBLE Does not affect another target's local variables.
- .JOIN Join's this target's source list to that of all the
- targets that depend on it.
- .MAKE Special target to be executed even if -n specified.
- .NOTMAIN If this is first target, don't assume it is .MAIN.
- .PRECIOUS Do not delete target if pmake is interrupted.
- .SILENT Do not echo script.
- .USE Causes all commands, sources and attributes to be
- passed to targets that depend on this target.
- .EXPORT Not used.
- .EXPORTSAME Not used.
- .NOEXPORT Not used.
-
- Special targets
- ---------------
- .BEGIN Performed first.
- .DEFAULT Performed if pmake can't figure out how to make a
- particular target.
- .END Performed last.
- .IGNORE Defines all targets that are to ignore errors.
- .INCLUDES Lists suffixes that are to be searched for in .PATH.
- .INTERRUPT Performed if pmake is interrupted.
- .LIBS Lists suffixes that are to be searched for in .LIBS.
- .MAIN Defines target to be used if no .MAIN defined.
- .MAKEFLAGS Default flags to be used by pmake.
- .NULL Lists suffixes to assume if none present on a file.
- .PATH Lists directories to search for files in.
- .PATH<suffix> Lists directories to search for files with the given
- suffix in.
- .PRECIOUS Sets the .PRECIOUS attribute to each of the sources
- given.
- .RECURSIVE Applies the .MAKE attribute to all of its sources.
- .SHELL Defines the shell to use by pmake. Sources have the
- following format:
- path=<path> Path of shell.
- name=<name> Name of shell.
- quiet=<cmd> Command to send shell to make it not
- echo commands.
- echo=<cmd> Command to send shell to make it echo
- commands.
- filter=<fmt> Text of echo-off command to be
- filtered from printing.
- echoFlag=<flg>Flag to use to enable echoing of
- commands by the shell (-x).
- errFlag=<flg> Flag to use to turn error checking on
- in the shell (-e).
- check=<cmd> Command to send shell to turn on error
- checking.
- ignore=<cmd> Command to send shell to turn off
- error checking.
- hasErrCtl=<yes/no>Indicates whether the shell even
- has error checking.
- .SILENT Applies the .SILENT attribute to each of its sources.
- .SUFFIXES Defines the suffixes that pmake should recognize.
- <attribute> Any of the attributes listed above can be given in
- this form to set the attribute for the sources listed.
- .EXPORT Ignored.
-
- Files of interest
- -----------------
- /usr/include/make/system.mk Built-in rules.
- /usr/include/make/makelib.mk .USE target for making archives.
- /usr/include/make/makelint.mk .USE target for makeing lint libs.
-